package com.hnevc.chenqi;
/**
 * 输入两点坐标（X1,Y1）,（X2,Y2）,计算并输出两点间的距离
 * 先定义输出在计算
 */

import java.util.Scanner;

public class Homework11 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请您输入第一个坐标点");
        double x1 =sc.nextDouble();
        double y1 =sc.nextDouble();
        System.out.println("请您输入第二个坐标点");
        double x2 =sc.nextDouble();
        double y2 =sc.nextDouble();
        double distance =((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
        System.out.printf("两点间距离为："+"%.2f",distance);
    }
}
